package simple

import (
	"fmt"
)

type Girl interface {
	weight()
}

// FatGirl 胖女孩
type FatGirl struct{}

// ThinGirl 瘦女孩
type ThinGirl struct{}

type GirlFactory struct{}

func (*FatGirl) weight() {
	fmt.Println("100KG")
}
func (*ThinGirl) weight() {
	fmt.Println("10KG")
}

func (g *GirlFactory) CreateGirl(weightTyp string) Girl {
	if weightTyp == "fat" {
		return &FatGirl{}
	}
	if weightTyp == "thin" {
		return &ThinGirl{}
	}
	return nil

}
